﻿// JScript 文件

$(document).ready(function(){
	save();
});

function save(){
	var options = { 
		//target:        '#output1',   // target element(s) to be updated with server response 
		method:   'GET',
		url:           'http://'+top.location.host+'/Control/Ajax.ashx?id=7', 
		beforeSubmit:  showRequest,    // pre-submit callback 
		success:       showResponse ,  // post-submit callback
		error:         showError 
	}
	$('#myForm').ajaxForm(options);
}
function showRequest(formData, jqForm, options) { 
    var queryString = $.param(formData);
    //alert(queryString);
    return true; 
}
// post-submit callback 
function showResponse(responseText, statusText)  { 
    alert(""+responseText); 
    //$("#div1").hide() 
}

function showError (XMLHttpRequest, textStatus, errorThrown){
	alert(textStatus);
}